﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=1">
    <meta name="format-detection" content="telephone=no">
    <meta charset="UTF-8">
    <title>1.0helloworld</title>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <script src="../js/jquery-2.2.0.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
</head>
<body>
<h1>1.0helloworld</h1><br/>

<div id="app">
    {{content}}

</div>
<script src="../js/vue-2.5.16.js"></script>
<script src="../node_modules/axios/dist/axios.js"></script>
<script src="../node_modules/lodash/lodash.js"></script>

<script>
    // 创建Vue实例，接管id为app的dom元素，数据是data里的content
    //页面可以通过{{}}的方式渲染
    var app = new Vue({
        el:'#app',
        data:{
            content:'hello world'
        }
    });
    //以数据驱动，不再操作dom元素 数据改变，页面就会跟着改变
    setTimeout(function(){
        app.$data.content = 'bye world';
    },2000);
</script>

</body>
</html>
